#ifndef VIDEORECVER_H
#define VIDEORECVER_H

#include <QObject>
#include <QUdpSocket>
#include <QImage>

//typedef struct
//{
//    int PackNum;
//    int packTaken;
//    char data[1024];
//}ImagePackage;

class videoRecver : public QObject
{
    Q_OBJECT
public:
    explicit videoRecver(QString ip,int port,QObject *parent = nullptr);
    ~videoRecver();

private:
    QUdpSocket* socket;
    bool TaskSignal = true;
    QString ip;
    int port;

public slots:
    void onReadyRead();
    void endTask();
signals:
    void recvComplete(QImage image);

};

#endif // VIDEORECVER_H
